﻿@using Kevin.Shop.Business.Service.Entity.Helper


@if (WebClientContext.Current.CategorySwitch == WebClientContext.StrGroup)
{
    <ul data-role="listview" data-divider-theme="a" data-inset="true">
        <li data-role="list-divider">
            <h1 class="white">商品分类</h1>
        </li>
        <li data-theme="none" data-icon="false">
            <div data-role="collapsible-set">
                @foreach (var item in Model)
                { 
                    <div data-role="collapsible">
                        <h2>@item.CategoryName</h2>
                        <ul data-role="listview">
                            @foreach (var subitem in item.CategoryList)
                            { 
                                <li><a  href="~/Sort/SubCategoryList?id=@subitem.CategoryId">@subitem.CategoryName</a></li>
                            }
                        </ul>
                    </div>
                }
            </div>
        </li>
    </ul>
}
else
{
    <ul >
         <li data-icon="delete"><a href="#" data-rel="close" data-theme="f" data-role="button">关闭</a></li>
        @foreach (var item in Model)
        {    
            foreach (var subitem in item.CategoryList)
            { 
                <li class="box_content"><a rel="external"  href="~/Product/ProductList?sid=@subitem.CategoryId">@subitem.CategoryName</a></li>
            }
        }
    </ul>
}